import { createStore } from 'redux'

const reducer = (state, action) => {
    let NewState = JSON.parse(JSON.stringify(state))
    switch(action.type) {
        case "SET_LIST":
            NewState.list = action.list
            console.log(NewState)
            return NewState
        default:
            return state
    }
}

const initState = {
    list: []
}

let store = createStore(reducer, initState)

export default store